package com.einmeer.hfbank.service.impl;

import com.einmeer.hfbank.entity.InterestRate;
import com.einmeer.hfbank.hfconst.InterestRateConst;
import com.einmeer.hfbank.mapper.InterestRateMapper;
import com.einmeer.hfbank.service.InterestRateService;
import com.einmeer.hfbank.vo.ResultVo;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 芊嵛
 * @date 2024/1/13
 */
@Service
public class InterestRateServiceImpl implements InterestRateService {
    @Resource
    private InterestRateMapper interestRateMapper;


    @Override
    public ResultVo queryAll() {
        List<InterestRate> list = interestRateMapper.selectAll();
        if (list == null) {
            return new ResultVo(InterestRateConst.CARDNO, InterestRateConst.SELECTNO);
        }
        return new ResultVo(InterestRateConst.CARDOK, list, InterestRateConst.SELECTOK);
    }
}
